# encoding: UTF-8
'''
Created: 2014-05-06 13:39

@author: VAN
'''
import redis

def client():
    print redis.__file__
    rds = redis.Redis(host='localhost', port=6379, db=1)
    info = rds.info()
    for key in info:
        print "%s %s" % (key, info[key])

def pool():   
    redispool = redis.ConnectionPool(host='localhost', port=6379, db=0)
    cli = redis.Redis(connection_pool=redispool);
      
    info = cli.info()
    for key in info:
        print "%s %s" % (key, info[key])
    
    while(1):
        import time
        time.sleep(5)
        pass
    
pool()